package com.cy.mall.web.comm;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cy.mall.model.dto.xiaoan.XiaoanCreditCheckRecordNotifyDTO;
import com.cy.mall.model.dto.xiaoan.XiaoanNotifyResult;
import com.cy.mall.service.customer.CustomerService;
import com.cy.mall.web.BaseController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 第三方通知回调入口
 *
 * @author tanyilin
 *
 * @create 2019年3月5日 上午11:49:35
 */
@RestController
@RequestMapping("/api/notify")
@Api(tags = "第三方通知回调入口")
public class NotifyController extends BaseController {

	@Autowired
	private CustomerService customerService;
	
	@ApiOperation("小安蓝精灵客户评估完成结果通知回调接口")
	@PostMapping("/xiaoan/credit/check")
	public XiaoanNotifyResult xiaoanCreditCheckNotify(@RequestBody XiaoanCreditCheckRecordNotifyDTO notifyDTO) {
		
		XiaoanNotifyResult result = customerService.handleXiaoanCreditCheckNotify(notifyDTO);
		
		return result;
	}
	
}
